file(GLOB_RECURSE srcs CONFIGURE_DEPENDS src/*.cpp include/*.h)
add_library(main STATIC ${srcs})
target_include_directories(main PUBLIC include)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
#通过PUBLIC的传染性，为main链接其他子库
#target_link_libraries(main PUBLIC common)
#target_link_libraries(main PUBLIC performance_monitoring)
#target_link_libraries(main PUBLIC DM_motor)
#target_link_libraries(main PUBLIC Threads::Threads)
#如果此模块需要生成可执行文件时


# Header path
include_directories(
        /usr/local/Ascend/thirdpart/include/test/
        /usr/local/Ascend/thirdpart/include/sysmonitor/
)
#链接动态库
link_directories(
	/usr/local/Ascend/thirdpart/lib/
)
my_add_target(Main EXECUTABLE)
target_link_libraries(Main main test sysmonitor)
set_target_properties(Main PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)